package com.kxy.auth.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.kxy.auth.model.User;
import com.kxy.auth.web.base.BaseController;

@RestController
@RequestMapping("/security")
public class SecurityController{
/*	@Autowired
	BCryptPasswordEncoder bCryptPasswordEncoder;*/
	
	 @RequestMapping("/login")  
	public String login(@RequestBody User user) {
		//String password =  bCryptPasswordEncoder.encode(user.getPassword());
		String password  = user.getPassword();
		user.setPassword(password);
		return "Success";
	}
	

}
